<#assign pageTitle = "我的收藏" />
<#assign pageHeader>
</#assign>
<#assign pageContent>
    <article class="w80 fl">
        <div class="u-r-cont">
            <section>
                <div class="">
                    <section class="u-r-tit-all">
                        <h2 class="unFw">
                            <span <#if typeId == 2>class="current"</#if>><a
                                        href="/user/favorite.html?typeId=2">课程(${courseCount})</a></span>
                            <span <#if typeId == 3>class="current"</#if>><a
                                        href="/user/favorite.html?typeId=3">书籍(${bookCount})</a></span>
                            <span <#if typeId == 4>class="current"</#if>><a
                                        href="/user/favorite.html?typeId=4">素材(${pictureCount})</a></span>
                            <span <#if typeId == 5>class="current"</#if>><a
                                        href="/user/favorite.html?typeId=5">资料(${documenrCount})</a></span>
                        </h2>
                    </section>
                    <section class="u-r-all-box">
                        <div class="u-fav-list">
                            <section class="no-data-wrap" <#if (favoriteList?size >0)>style="display: none" </#if>>
                                <#if typeId == 2>
                                    <em class="icon30 no-data-ico">&nbsp;</em>
                                    <span class="c-666 fsize14 ml10 vam">还没有收藏任何课程！~
                                             <a href="/course/list.html" class="c-master">马上去学习</a>
                                        </span>
                                <#elseif typeId == 3>
                                    <em class="icon30 no-data-ico">&nbsp;</em>
                                    <span class="c-666 fsize14 ml10 vam">还没有收藏任何书籍！~
                                                <a href="/book/index.html" class="c-master">马上去找找</a>
                                            </span>
                                    </span>
                                <#elseif typeId == 4>
                                    <em class="icon30 no-data-ico">&nbsp;</em>
                                    <span class="c-666 fsize14 ml10 vam">还没有收藏任何素材！~
                                            <a href="/picture/index.html" class="c-master">马上去找找</a>
                                        </span>
                                <#elseif typeId == 5>
                                    <em class="icon30 no-data-ico">&nbsp;</em>
                                    <span class="c-666 fsize14 ml10 vam">还没有收藏任何资料！~
                                            <a href="/document/index.html" class="c-master">马上去找找</a>
                                        </span>
                                </#if>
                            </section>
                            <#if favoriteList??>
                                <ul>
                                    <#if typeId == 2>
                                        <#list favoriteList as favorite>
                                            <li>
                                                <dl>
                                                    <dd class="u-order-list">
                                                        <section style="width: 57%" class="disIb vam u-o-left">
                                                            <div class="mr30 u-o-l-infor">
                                                                <div class="c-cou-item">
                                                                    <div class="my-sc-box">
                                                                        <div>
                                                                            <a class="u-ol-pic"
                                                                               href="/course/view/${favorite.infoId}.html"
                                                                               title="${favorite.title!}">
                                                                                <img src="${staticSite}${favorite.cover!}"
                                                                                     alt="">
                                                                            </a>
                                                                            <h6 class="hLh30 txtOf name">
                                                                                <a class="fsize16 c-333"
                                                                                   href="/course/view/${favorite.infoId}.html"
                                                                                   title=""> ${favorite.title!}</a>
                                                                            </h6>
                                                                            <section class="hLh20 txtOf mt10">
                                                                                <#if favorite.teacherList??>
                                                                                    <span class="fsize14 c-999 vam">主讲：</span>
                                                                                    <#list favorite.teacherList as teacher>
                                                                                        <span class="fsize14 c-999 vam">${teacher.name}</span>
                                                                                    </#list>
                                                                                </#if>
                                                                            </section>
                                                                            <section class="hLh20 txtOf mt10 u-o-l-jg">
                                                                                    <span class="c-999 fsize13">
                                                                                        ${favorite.addTime?string("yyyy-MM-dd HH:mm")}
                                                                                    </span>
                                                                            </section>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </section>
                                                        <section class="w20 disIb vam u-o-maddile col-tw tac mb10">
                                                            <div class="disIb vam tac u-o-price">
                                                                <span class="c-master f-fM fsize16">
                                                                    ￥<font>${favorite.price/100}</font>
                                                                </span>
                                                            </div>
                                                        </section>
                                                        <section class=" w20 col-tw disIb vam u-o-right">
                                                            <div class="tac u-o-r-btn-infor">
                                                                <p class="c-999 f-fA mb10"><a href="javascript:void(0)"
                                                                                              onclick="del(${favorite.infoId},2)"
                                                                                              class="cou-kscp"
                                                                                              style="margin-right: 0">取消收藏</a>
                                                                </p>
                                                            </div>
                                                        </section>
                                                        <div class="clear"></div>
                                                    </dd>
                                                </dl>
                                            </li>
                                        </#list>
                                    <#elseif typeId == 3>
                                        <#list favoriteList as favorite>
                                            <li>
                                                <dl>
                                                    <dd class="u-order-list">
                                                        <section style="width: 57%" class="disIb vam u-o-left">
                                                            <div class="mr30 u-o-l-infor">
                                                                <div class="c-cou-item">
                                                                    <div class="my-sc-box">
                                                                        <div>
                                                                            <a style="width: 102px" class="u-ol-pic"
                                                                               href="/book/view/${favorite.infoId}.html"
                                                                               title="${favorite.title!}">
                                                                                <img src="${staticSite}${favorite.cover!}"
                                                                                     alt="">
                                                                            </a>
                                                                            <h6 class="hLh30 txtOf name">
                                                                                <a class="fsize16 c-333"
                                                                                   href="/book/view/${favorite.infoId}.html"
                                                                                   title=""> ${favorite.title!}</a>
                                                                            </h6>
                                                                            <section class="hLh20 txtOf mt10 u-o-l-jg">
																			<span class="c-999 fsize13">
																				${favorite.addTime?string("yyyy-MM-dd HH:mm")}
																			</span>
                                                                            </section>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </section>
                                                        <section class="w20 disIb vam u-o-maddile col-tw tac mb10">
                                                            <div class="disIb vam tac u-o-price">
														<span class="c-master f-fM fsize16">
															￥<font>${favorite.price/100}</font>
														</span>
                                                            </div>
                                                        </section>
                                                        <section class=" w20 col-tw disIb vam u-o-right">
                                                            <div class="tac u-o-r-btn-infor">
                                                                <p class="c-999 f-fA mb10"><a href="javascript:void(0)"
                                                                                              onclick="del(${favorite.infoId},3)"
                                                                                              class="cou-kscp"
                                                                                              style="margin-right: 0">取消收藏</a>
                                                                </p>
                                                            </div>
                                                        </section>
                                                        <div class="clear"></div>
                                                    </dd>
                                                </dl>
                                            </li>
                                        </#list>
                                    <#elseif typeId == 4>
                                        <#list favoriteList as favorite>
                                            <li>
                                                <dl>
                                                    <dd class="u-order-list">
                                                        <section style="width: 57%" class="disIb vam u-o-left">
                                                            <div class="mr30 u-o-l-infor">
                                                                <div class="c-cou-item">
                                                                    <div class="my-sc-box">
                                                                        <div>
                                                                            <a class="u-ol-pic"
                                                                               href="/picture/view/${favorite.infoId}.html"
                                                                               title="${favorite.title!}">
                                                                                <img src="${staticSite}${favorite.cover!}"
                                                                                     alt="">
                                                                            </a>
                                                                            <h6 class="hLh30 txtOf name">
                                                                                <a class="fsize16 c-333"
                                                                                   href="/picture/view/${favorite.infoId}.html"
                                                                                   title=""> ${favorite.title!}</a>
                                                                            </h6>
                                                                            <section class="hLh20 txtOf mt10 u-o-l-jg">
																			<span class="c-999 fsize13">
																				${favorite.addTime?string("yyyy-MM-dd HH:mm")}
																			</span>
                                                                            </section>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </section>
                                                        <section class="w20 disIb vam u-o-maddile col-tw tac mb10">
                                                            <div class="disIb vam tac u-o-price">
														<span class="c-master f-fM fsize16">
															￥<font>${favorite.price/100}</font>
														</span>
                                                            </div>
                                                        </section>
                                                        <section class=" w20 col-tw disIb vam u-o-right">
                                                            <div class="tac u-o-r-btn-infor">
                                                                <p class="c-999 f-fA mb10"><a href="javascript:void(0)"
                                                                                              onclick="del(${favorite.infoId},4)"
                                                                                              class="cou-kscp"
                                                                                              style="margin-right: 0">取消收藏</a>
                                                                </p>
                                                            </div>
                                                        </section>
                                                        <div class="clear"></div>
                                                    </dd>
                                                </dl>
                                            </li>
                                        </#list>
                                    <#elseif typeId == 5>
                                        <#list favoriteList as favorite>
                                            <li>
                                                <dl>
                                                    <dd class="u-order-list">
                                                        <section style="width: 57%" class="disIb vam u-o-left">
                                                            <div class="mr30 u-o-l-infor">
                                                                <div class="c-cou-item">
                                                                    <div class="my-sc-box">
                                                                        <div>
                                                                            <a class="u-ol-pic"
                                                                               href="/document/view/${favorite.infoId}.html"
                                                                               title="${favorite.title!}">
                                                                                <img src="${staticSite}${favorite.cover!}"
                                                                                     alt="">
                                                                            </a>
                                                                            <h6 class="hLh30 txtOf name">
                                                                                <a class="fsize16 c-333"
                                                                                   href="/document/view/${favorite.infoId}.html"
                                                                                   title=""> ${favorite.title!}</a>
                                                                            </h6>
                                                                            <section class="hLh20 txtOf mt10 u-o-l-jg">
																			<span class="c-999 fsize13">
																				${favorite.addTime?string("yyyy-MM-dd HH:mm")}
																			</span>
                                                                            </section>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </section>
                                                        <section class="w20 disIb vam u-o-maddile col-tw tac mb10">
                                                            <div class="disIb vam tac u-o-price">
														<span class="c-master f-fM fsize16">
															￥<font>${favorite.price/100}</font>
														</span>
                                                            </div>
                                                        </section>
                                                        <section class=" w20 col-tw disIb vam u-o-right">
                                                            <div class="tac u-o-r-btn-infor">
                                                                <p class="c-999 f-fA mb10"><a href="javascript:void(0)"
                                                                                              onclick="del(${favorite.infoId},5)"
                                                                                              class="cou-kscp"
                                                                                              style="margin-right: 0">取消收藏</a>
                                                                </p>
                                                            </div>
                                                        </section>
                                                        <div class="clear"></div>
                                                    </dd>
                                                </dl>
                                            </li>
                                        </#list>
                                    </#if>
                                </ul>
                            </#if>
                        </div>
                        <!-- 公共分页 开始 -->
                        <div class="paging" id="showPages"></div>
                        <!-- 公共分页 结束 -->
                    </section>
                </div>
            </section>
        </div>
    </article>
</#assign>
<#assign pageFooter>
    <script type="text/javascript" src="/static/js/page.js"></script>
    <script type="text/javascript">
        var options = {
            currentPage: ${page.currentPage}
            , totalPage: ${totalPages}
            , typeId: ${typeId}
        };
        $(function () {
            showPages(options);
        });

        function del(infoId,typeId) {
            layer.alert("确认要删除此收藏吗？注意此操作不可恢复！", function () {
                deleteFavorite(infoId,typeId);
            });
        }
    </script>
</#assign>
<#include "../layouts/layout_uc.ftl">